package avicit.im.lantop.basic.fieldmapset.action.rest;


import avicit.im.lantop.basic.fieldmapset.action.service.impl.LantopFieldMapSetManagerDao;
import avicit.platform6.core.rest.msg.ResponseMsg;
import com.github.pagehelper.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.Map;

/**
 * @金航数码科技有限责任公司
 * @作者：jiam
 * @邮箱：jiam@avic-digital.com
 * @创建时间： 2020-12-31 14:52
 * @类说明：oa_travel_rbRest
 * @修改记录：
 */

@RestController
@Api(tags = "LantopFieldMapSetManagerDao", description = "LantopFieldMapSetManagerDao")
@RequestMapping("/api/avicit/im/lantop/basic/fieldmapset/action/rest/LantopFieldMapSetManagerDaoRest")
public class LantopFieldMapSetManagerDaoRest {


    private static final Logger LOGGER = LoggerFactory.getLogger(LantopFieldMapSetServiceRest.class);


    @Autowired(required = true)
    LantopFieldMapSetManagerDao lantopFieldMapSetManagerDao;



    /**
     *
     * Title: 表MDM_DB_LIMIT_INFO的数据库操作类 Description:
     * 包含对表MDM_DB_LIMIT_INFO(业务预警值信息（已经根据多条预警原始值拼装过）)的增、删、改、查、构建等基本操作 Copyriht:
     * Copyright (c) 2012 Company: AVICIT Co., Ltd
     *
     * @author 朱锋
     * @version 1.0 Date: 2014-09-11
     *
     */
    @PostMapping("/callProcedure")
    @ApiOperation(value = "删除字段对应设置")
    public ResponseMsg callProcedure(@ApiParam(value = "删除字段对应设置", name = "params") @RequestBody ArrayList<Object> params) {
        ResponseMsg responseMsg = new ResponseMsg<>();
        try {
            lantopFieldMapSetManagerDao.callProcedure("LANTOP_DATA_P.LANTOP_DATA_V", params);
            responseMsg.setRetCode("200");
        } catch (Exception e) {
            responseMsg.setRetCode("201");
            responseMsg.setErrorDesc(e.getMessage());
            e.printStackTrace();
        }
        return responseMsg;
    }
}
